home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 July / Ahoy_Magazine_87-07_1987_Double_L_Side_A.d64 / Electric Power1 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  429b  |  17 lines

  1. 0 rem << cd43-2 >>
  2. 1 rem ==================================
  3. 2 rem    commodares problem #39-2 :
  4. 3 print"[147]   [197]lectric [208]ower 1"
  5. 4 rem    solution by
  6. 5 rem    scott duncan
  7. 6 rem ==================================
  8. 10 r=2.79
  9. 20 for i=1 to 3:read u(i),r(i): next i
  10. 30 data 600, .0928, 90, .1052, 12, .1259
  11. 40 input "initial, final meter readings";u1,u2 : u=u2-u1
  12. 50 for i=1 to 3
  13. 60 j=u-u(i)
  14. 70 if j>0 then r=r+j*r(i) : u=u-j
  15. 80 next
  16. 90 print r "is due"
  17.